<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});

Route::get('/', 'WelcomeController@index');
Route::group(['prefix' => 'test', 'namespace'=> 'Test'], function () {
    Route::get('/', 'WelcomeController@index');
    Route::get('/pay', 'PayController@index');
    Route::get('/pay/notify', 'PayController@notify');
});

Route::get('/token', 'TokenController@index');
Route::group(['prefix' => 'login', 'middleware' =>['member.check']], function () {
    Route::get('/', 'LoginController@index');
    Route::post('/', 'LoginController@login');
});
Route::get('/logout', 'LogoutController@index');
Route::group(['prefix' => 'mc','middleware' =>['member.auth'], 'namespace'=> 'MemberCenter'], function () {
    Route::get('/', 'WelcomeController@index');
    Route::get('/paper', 'PaperController@index');
});